Transforming condition-independent output into condition-dependent output

ABSTRACT

A method and apparatus for providing a network based operating system for mobile clients is disclosed. Services may be developed that can be used to support different client devices with different capabilities. The services provide output with multiple variations based on different devices, and an intermediary selects the variation best suited for the requesting device. An online software development system is provided to allow services to create, edit, test, and deploy applications at an intermediary using only a browser at the client end. Services may also be provided that can be accessed and referred to by other services, thereby facilitating the combining of different services. Services may also store and access data at an intermediary using variables and a mapping of the stored data to the variables. Data stored at the intermediary may be used to allow an end user to return to a previously accessed service.

CROSS-REFERENCE TO RELATED APPLICATIONS Benefit Claim

This application is a Continuation of U.S. patent application Ser. No.09/947,910, filed Sep. 5, 2001; which claims the benefit of U.S.Provisional Application No. 60/230,489, filed Sep. 6, 2000, the entirecontents of which is hereby incorporated by reference for all purposesas if fully set forth herein under 35 U.S.C. §120. The applicants herebyrescind any disclaimer of claim scope in the parent application or theprosecution history thereof and advise the USPTO that the claims in thisapplication may be broader than any claim in the parent application.

FIELD OF THE INVENTION

The present invention relates to providing services to clients and, morespecifically, to providing content from multiple services.

BACKGROUND OF THE INVENTION

The World Wide Web includes a network of servers on the Internet, eachof which is associated with one or more HTML (Hypertext Markup Language)pages. The HTML pages associated with a server provide information andhypertext links to other documents on that and (usually) other servers.Servers communicate with clients by using the Hypertext TransferProtocol (HTTP). The servers listen for requests from clients for theirHTML pages, and are therefore often referred to as “listeners”.

Users of the World Wide Web use a client program, referred to as abrowser, to request, decode and display information from listeners. Whenthe user of a browser selects a link on an HTML page, the browser thatis displaying the page sends a request over the Internet to the listenerassociated with the Universal Resource Locator (URL) specified in thelink. In response to the request, the listener transmits the requestedinformation to the browser that issued the request. The browser receivesthe information, presents the received information to the user, andawaits the next user request.

Traditionally, the information stored on listeners is in the form ofstatic HTML pages. Static HTML pages are created and stored at thelistener prior to a request from a web browser. In response to arequest, a static HTML page is merely read from storage and transmittedto the requesting browser. Currently, there is a trend to developlisteners that respond to browser requests by performing dynamicoperations. For example, a listener may respond to a request by issuinga query to a database, dynamically constructing a web page containingthe results of the query, and transmitting the dynamically constructedHTML page to the requesting browser.

Another trend is to expand Internet access to devices other thanconventional computer systems. For example, many mobile clients (ormobile devices), such as wireless phones, have been developed thatinclude embedded web browsers. Due to size and cost constraints, the“micro browsers” contained in these devices have very limitedfunctionality relative to the browsers that have been developed forfull-fledged computer systems. However, devices with embedded microbrowsers are usable in circumstances under which using a conventionalcomputer system is impractical.

The number of device types that are able to display web content, in oneform or another, continues to increase. For example, there are desktop,laptop and pocket computers, mobile phones, pagers, and personal digitalassistants (PDAs) that can be described as “web-enabled” because theyare able display web content. As the number of web-enabled device typesincreases, so does the variation in the capabilities of the devices. Forexample, general purpose computer systems compensate for theirimmobility by providing large color screens, sophisticated sound output,significant processing power, ergonomic keyboard input, and aneasy-to-use selection device such as a mouse, track ball, or track pad.Conversely, small mobile devices achieve their portability at theexpense of screen size and user-input ease-of-use.

Yet another trend is to offer services to clients via a server on anetwork. Typically the network is the Internet, the client is a user,and the service is available from the server via a website. The servicemay supply information such as restaurant reviews, weather reports,stock quotations, or news updates. The service may also be moreinteractive, such as allowing the user to purchase goods, such as booksor music, or to purchase services, such as booking travel arrangements.As used herein, the term “service” refers to providing information,functions, or capabilities to a client.

The process by which the user accesses the service depends on the typeof client the user has. For example, a desktop computer can connect tothe Internet through a dial-up line, a digital subscriber line (DSL), acable modem, an integrated services digital network (ISDN) connection,or many other available methods. Wireless application protocol (WAP)phones may connect to the Internet over a wireless connection through aWAP-to-HTTP gateway. Generally, the client logs in to the website and ispresented with a list of available services, from which the clientselects the desired service.

Generally, a service is provided in one of two ways: as a hostedapplication or as a portal application. With a typical hostedapplication, a developer creates the application, but a host installsand maintains the application for access by end-users, or customers, onthe host network of servers. In contrast, with a typical portalapplication, the developer both creates the application and deploys itfor access by end users, or customers, via one or more serverscontrolled by the developer. The “developer” referred to herein may bethe individual, company, or other entity that provides the service (alsoreferred to as a service provider), or the developer may be anotherentity providing software development services to the service provider.

A common problem with providing services via applications, whether theyare hosted applications or portal applications, is that the applicationmust be designed to work with all devices. However, devices will varywidely in their capabilities based on both the type of device and theparticular capabilities of different models of devices of the same typeor class of device. For example, a desktop computer will generally havea fully functional web browser, whereas a personal computing device willhave a micro browser with limited functionality. Also, some mobilephones may have a limited display that only allows for a single word oneach line of the display, while other mobile phones may have a largerdisplay capable of showing several words on each line.

The variation of capabilities can make it difficult for an applicationdeveloper to support all possible devices. For example, a service mayinvolve the display of graphic images, such as those of products offeredfor sale, which may be easily viewed on the full function web browser ofa desktop computer but which may be incapable of display on a mobilephone. Also, even if the developer is only concerned with a certain typeor class of device, the differences in capabilities may be significant.For example, if the application programmer sends output containingmultiple words describing several items of information, mobile phoneswith limited display screens may only be capable of showing the firstword of each information item on each line of the display screen, or theoutput for a single information item will fill multiple lines on thephone display, precluding other information items from being shownsimultaneously.

One approach to solving the problem of designing for devices of varyingcapabilities is to design for the “lowest common denominator.” Thelowest common denominator approach involves designing the application towork on the most limited device available. For example, if a menu ofoptions is to be displayed on a client device, such as a mobile phone,an application programmer may select short, one-word labels for each ofthe options because all devices that will use the application cansupport one-word labels. For example, the application developer mayemploy the single word menu item “Return” for a mapping application forthe option of generating return directions from a selected destination.

However, a drawback of the lowest common denominator approach is thatthe output does not take advantage of the superior capabilities of otherdevices. For example, if a client device is capable of displaying alonger label, such as “Generate Return Directions,” the longer labelwould be preferred, since “Return” is ambiguous and may be incorrectlyinterpreted by the user as meaning “Return to Previous Menu.” Inaddition, the capabilities incorporated into new devices would golargely unused if all applications were targeted to the minimalcapabilities of older devices.

An alternative approach to solving the problem of designing for clientsor devices of varying capabilities is to design for some intermediatelevel of capability, such as the most common type of mobile phone.However, an application using this intermediate approach may notfunction properly on devices with lesser capabilities, and theapplication will still fail to take advantage of the enhancedcapabilities of other devices.

Another problem with providing services via applications is how tosupport additional devices that become available after the applicationis developed. For example, several months after release of anapplication by a service provider, a device manufacturer may release anew device. The new device could be an evolutionary advance over currentdevices that improves existing features, or the new device could be amore significant advance in that class of device that adds significantnew features, or the new device may be a new type of device that addsnew capabilities or has a new combination of capabilities.

New devices with improved capabilities can be accommodated by using thelowest common denominator approach, but the enhanced features andcapabilities of the new devices, such as larger displays, may go largelyunused. For example, if the application only provides one-word menuoptions, the application will not be taking advantage of an improveddevice that is able to display multiple word options. Furthermore, witha later released device, the lowest common denominator approach maycompletely avoid using new capabilities, such as being able to handlevoice data or graphics. Even if the application is designed for anintermediate level of capabilities, the application may still fail tofully utilize all of the advances and improvements in future devicesthat may be created.

Yet another problem with application development is having easy accessto the tools available to the developer to create the application.Typically, a developer designing an application for a particularplatform (e.g., a combination of hardware, operating system and/orprotocols) will utilize a software development kit (SDK). An SDK willgenerally contain an application programming environment, some commonlyused libraries for various features, application programming interfaces,utilities, documentation, a compiler for generating executable code fromsource code, and a debugger for diagnosing programming problems. To usethese tools, the developer obtains the software, documentation, andother materials from an SDK provider, and then the developer installsthe software and other tools onto a local computer or network. Later, asthe SDK provider makes improvements and upgrades, the developerincorporates such changes into the local installation of the SDKpackage. Thus, the application developers may have to expend significantresources to install and maintain the SDK. In addition, conventionalSDK's typically require significant resources not only for the SDKitself, but also for application development and the infrastructure forthe setup, testing, and deployment of the runtime applications.

Individual service providers may want to offer other services that arerelated to their core services to enhance the overall experience of thecustomers of the service. For example, if a user seeks out drivingdirections to a particular destination from one service provider, thedriving direction provider may also want to offer the user additionalinformation about the weather or dining options at the particulardestination. One way for the driving direction provider to offer suchadditional information is to create the necessary additional services,which can entail significant additional development resources. Anotherapproach is for the service provider to make arrangements with anotherservice provider to obtain the desired functionality. However, makingarrangements with other service providers may involve significantcoordination, both in establishing the technical infrastructure toconnect the two providers' services and also to establish a means forgauging the level of use by the first provider's customers for billingpurposes.

Still another concern with providing services via applications is thatthe service provider may want to incorporate into the applicationsdurably stored data that is available to the applications when executed.The service provider may then have to incur the burden of establishingand maintaining the stored data so that the data is available whenrequired by the applications.

Based on the foregoing, it is desirable to provide improved techniquesfor designing applications that more effectively work with all devices.It is also desirable to have improved techniques for creatingapplications. Further, it is desirable to have improved techniques thatallow service providers to offer additional services. Also, it isdesirable to have improved techniques for incorporating stored data intoan application.

SUMMARY OF THE INVENTION

Techniques are provided for providing content from multiple services.According to one aspect, content from difference services is combined.An intermediary receives a request from a client for content from aservice. The response from the service contains a reference to contentfrom another service. The intermediary retrieves the content from theother service and generates a response to the request that includes thecontent from both services. The content retrieved from the other servicemay be generated by the other service based on parameters provided inthe reference to the other service. The intermediary may also store arecord that indicates that content from the other service wasincorporated with the content from the original service.

In yet another aspect, clients may access multiple services. Anintermediary receives a request from a client for content from aservice. The response from the service contains a reference to anotherservice. The intermediary generates a reply to the client request thatincludes an object, such as a link, to the other service. The client maythen select the object to obtain the content from the other service. Thecontent retrieved from the other service may be generated by the otherservice based on parameters provided in the reference to the otherservice. The intermediary may also store a record that indicates thatother service was accessed from the original service.

In another aspect, content from a previously accessed service isprovided. An end user is provided by an intermediary with content from afirst service in response to a request. The end user makes anotherrequest for content from a second service. The intermediary stores arecord that indicates that the end user received content from the firstservice. The end user is provided with the requested content from thesecond service. The end user makes yet another request for content fromthe service previously accessed by the end user. The intermediary readsthe stored record to determine that the end user had previously accessedthe first service. The end user is provided with the requested contentfrom first service.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not by wayof limitation, in the figures of the accompanying drawings and in whichlike reference numerals refer to similar elements and in which:

FIG. 1A is a block diagram that illustrates a high level overview of asystem for providing services via applications accessed through anintermediary, according to one embodiment of the invention;

FIG. 1B is a block diagram that illustrates an overview of a hostserver, according to one embodiment of the invention;

FIG. 2 is a block diagram illustrates a condition hierarchy, accordingto one embodiment of the invention;

FIG. 3 is a flow diagram that depicts an approach for selecting analternative output segment, according to one embodiment of theinvention;

FIG. 4 is a block diagram illustrating an example of producing outputusing a shared hosted application, according to one embodiment of theinvention; and

FIG. 5 is a block diagram that illustrates a computer system upon whichan embodiment may be implemented.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

A network based operating system for mobile devices is described. In thefollowing description, for the purposes of explanation, numerousspecific details are set forth in order to provide a thoroughunderstanding of the present invention. It will be apparent, however, toone skilled in the art that the present invention may be practicedwithout these specific details. In other instances, well-knownstructures and devices are shown in block diagram form in order to avoidunnecessarily obscuring the present invention.

In the following description, the various functions shall be discussedunder topic headings that appear in the following order:

I. Structural and Functional Overview

-   -   A. Hosting Applications    -   B. Customizing Content Provided by a Service    -   C. Providing Content from Multiple Services    -   D. Accessing Data Stored at an Intermediary from a Service    -   E. Developing Applications Online

II. Developing Applications Online

-   -   A. Creating Applications and Services—General    -   B. Deploying a Hosted Application    -   C. Deploying a Shared Hosted Application    -   D. Accessing the New Application or Service

III. Generation of Device-Specific Mark-Up Code

-   -   A. Generation of Device-Specific Formatting    -   B. Producing Output that Takes into Account Request Conditions    -   C. Condition-Independent Output with Embedded Hints    -   D. Example of Using Embedded Hints to Identify a Type of Device    -   E. Producing Output Based Upon a Condition Hierarchy    -   F. Producing Output by Matching Request Conditions    -   G. Selecting Output Based on the Language Supported by the        Client Device    -   H. Using a Middleware Transformer to Transform        Condition-Independent Output    -   I. Example of Producing Output Using a Shared Hosted Application

IV. Accessing Other Applications and Services

-   -   A. Mobile Modules    -   B. Storing Data at an Intermediary

V. Hardware Overview

I. Structural and Functional Overview

Techniques are provided for facilitating the creation and deployment ofapplications that are used to provide services for access by devicessuch as mobile clients. These techniques include the development ofapplications that can be executed on a variety of devices by tailoringthe output, after it has been generated by the application, based on theparticular circumstances of the end user's use of the application, suchas the capabilities of a mobile client or the network conditionsexisting at the time a customer requests service from the application.Also, these techniques include combining the output, capabilities, andfeatures of services together, including techniques for allowing an enduser to return to a previously accessed service. In addition, thesetechniques include storing data at an intermediary for access by theapplications associated with a service using variables and a mapping ofthe variables to the stored data.

Further, these techniques include providing an online softwaredevelopment kit (SDK) so that application developers can create, test,modify, and deploy applications without having any special client-sidesoftware. Developers enter code through an interface provided by thewebsite of the SDK over the Internet. Because the website of the SDK isbased on XML and HTTP standards, the developer can reuse existing code.For example, if the developer has a Microsoft Internet InformationServices (IIS) server that serves “.asp” pages, the online SDK canaccess the developer's existing server and pages.

As used herein, the term “end user” denotes any person, organization orother entity that may use a device to access a service or application.The term “end user” encompasses the term “customer” although term“customer” does not necessarily imply a commercial relationship with aservice provider. Also, the term “end user” is distinguished from theterm “user”, which as discussed below, refers to developers and serviceproviders that create and maintain the applications, or computerprograms, that provide services to the end users.

A. Hosting Applications

FIG. 1A is a block diagram that illustrates a high level overview of asystem for providing services via applications accessed through anintermediary, according to one embodiment of the invention. FIG. 1 showsa network 100 that includes a host server 110. Network 100 may be anytype of network, including but not limited to a private network, such asan intranet, a public network, such as the Internet, or a combination ofdifferent networks and network types.

Host server 110 may be implemented on one or more servers at anintermediary, such as a hosting service provider, also known as a hostprovider or simply as a host. The function of the host is to install andmaintain applications, such as on host server 110, that are developed byeither the host provider or other application developers. Theapplications are typically part of a service, such as a web site, apaging service, or a telecommunications service. The host may alsoprovide “partial” or “shared” hosting of applications in which theapplications are stored on servers associated with the applicationdeveloper or service provider, but the applications may be accessed viathe host. Partial or shared hosting of applications is distinguishedfrom portal applications that are stored on servers associated with theapplication developer or service provider but which are not accessed viathe host. End users access the services offered by other parties andcompanies via the host by interacting with the hosted and partiallyhosted applications.

Network 100 also includes users 120, 122, 124 that are interconnectedwith host server 110 and each other on network 100 as illustrated. InFIG. 1A, users 120, 122, 124 may be service providers that offerservices for use by end users. Users 120, 122, 124 may also beapplication developers, who may be part of or associated with theservice providers. The service providers, application developers, andother parties create and maintain applications that are part of aservice offered to end users.

The applications that are part of a service may be hosted by the hostingprovider, such as on host server 110. The applications may also bepartially hosted by being stored at a server associated with a user, asillustrated by an application 126 that is included with user 124, andbeing accessed via the hosting provider, such as via host server 110.

B. Customizing Content Provided by a Service

FIG. 1A also illustrates end users 130, 132, 134 that are connected tohost server 110 by connections 140, 142, 144. Although end users 130,132, 134 are shown external to network 100 in FIG. 1, end users 130,132, 134 or other end users not shown may also be part of network 100.There are a number of different types of end users and connections. Forexample, end user 130 may be a desktop computer that is connected tohost server 110 through a variety of ways, such as via the Internet, aDSL connection, or an ISDN. Also, end user 132 may be a PDA that isconnected to host server 110 via a cellular modem connection. Further,end user 134 may be a mobile phone that is connected to the Internet andthereby to host server 110 via a WAP-to-HTTP gateway.

FIG. 1A also shows a connection 150 between end user 130 and user 120,and a connection 152 between end user 134 and a user 124. Connections150 and 152 permit direct communication between the end users and theusers, thus illustrating that not all communications between end usersand users pass through host server 110. For example, end user 130 may bea desktop computer and therefore is able to interact directly with user120 when requesting a service. However, the service that end user 130requests from user 120 may be supplied by a hosted application locatedon host server 110. In response to the service request from end user130, user 120 may send a request to host server 110 to provide end user130 with output from the hosted application via connection thatsatisfies the request. In response to the request from user 120, hostserver 110 may then execute the appropriate hosted application and sendthe resulting output to end user 130 over connection 140.

As another example, end user 134 may be a mobile phone that isinteracting with host server 110. End user 134 may request via hostserver 110 a service that is supplied by a shared hosted application,such as application 126 that is served from user 124. The host server110 then passes along the request for service from end user 134 to user124. User 124 then executes the appropriate application, such asapplication 126, and sends the resulting output to end user 134 overconnection 152.

FIG. 1A illustrates a representative embodiment of a system forproviding a network based operating system for mobile devices, while inpractice much larger and more complex networks featuring a number ofvariations of the configuration shown in FIG. 1A may be used. Forexample, a network based operating system for mobile devices may involvemore than one server associated with the host and virtually unlimitednumbers of users and end users. Also, not all users may be included in asingle network, such as network 100. Instead, users may be located inmany networks, including the Internet and intranets. Similarly, endusers may be located within a network that also includes the host serverand one or more users. In addition, the host provider may offer servicesdirectly to end users, in addition to hosting applications by others.Further, the types of end users, users, and connections discussed aboveare only representative examples.

FIG. 1B is a block diagram that illustrates an overview of host server110, according to one embodiment of the invention. Host server 110includes applications 160, 162 that may be hosted applications stored onhost server 110 or links to shared hosted applications stored on otherservers, similar to application 126.

Host server 110 includes a middleware transformer 112 for transformingapplication output into output that is tailored or customized based onparameters or conditions associated with a service request. For example,the capabilities of the client devices used by end users may varywidely. According to one embodiment, the application developer designsthe application to produce generic output that includes several outputvariations, also referred to as output segments, for presenting ordisplaying the output on the client device. The generic output isreceived by middleware transformer 112. The middleware transformer 112also receives or detects the parameters or conditions associated withthe service request. Middleware transformer 112 then selects aparticular output variation or option based on the parameters orconditions of the service request.

For example, the client, or end user, may be a mobile phone that isrequesting driving directions from a map service provider. The mobilephone may not be capable of displaying graphics, and therefore the mapservice provider need only supply a response to the request thatincludes text, not graphics, showing the desired route. However, the mapservice provider may have other customers that use other devices, suchas laptop computers, that are capable of displaying graphics in additionto text.

The application used by the map service provider may therefore generategeneric output that includes several variations of the requesteddirections, such as one output segment with text only and one with textand graphics. The application provides the generic output to middlewaretransformer 112, which also receives parameters or information from therequest, such as data that indicates that the client device is a mobilephone. Middleware transformer 112 then selects the output segment withtext only from the generic output and generates customized output thatcontains the text only output segment from the application, and thenmiddleware transformer sends the customized output to the end user. Inanother embodiment, the application produces a comprehensive set ofoutput that is customized or formatted by middleware transformer 112based on a style sheet selected based on the client device.

The approach of using a host to receive generic output and generatecustomized output provides several benefits. For example, theapplication developer does not have to write different applications, ordifferent output routines, for each specific condition that may meritchanges to the output. In fact, the application developer does not evenhave to be able to test for those conditions. Rather, the applicationdeveloper may write one application with output variations for each ofthe special conditions, which may include the specific model of theclient device, the type of the client device, and broad or narrow classof the client device, the network conditions, etc. As new devices andcapabilities are introduced, the middleware transformer can select theoutput variation that best matches the capabilities of the new clientdevices.

As another example, the output segments may depend on conditions thatexist at the time of the request, such as network congestion, the timeof the request, or the location of the user, which allow the middlewaretransformer to select an output variation or to format the output bytaking into account such conditions. Therefore, the applicationdeveloper may design the application to provide generic output thatincludes output segments for each of a variety of conditions and thenallow the host to select the particular output that is to be provided tothe end user based on the particular conditions for the particularrequest.

C. Providing Content from Multiple Services

Host server 110 also includes a service linker 114 for handling requestsfrom end users for service and forwarding the requests to theappropriate service or application for a response. In addition, servicelinker 114 can keep the session (or transaction) of other servicesactive. For example, an end user may be a mobile phone that iscommunicating with the host. The host provides the end user with a listof service options that may include a map service. When the end userselects the map service using the mobile phone, service linker 114receives the request from the end user and forwards the request to theprovider of the appropriate service. For example, if the service issupplied using a shared hosted application, the request may be forwardedto a server associated with the map service provider over the World WideWeb. The response to the request from the shared hosted application maybe received at the host in the form of generic output that is customizedfor the mobile phone, such as by using a middleware transformer asdiscussed above.

In another embodiment, applications incorporate the features and outputof other applications. The applications may also be referred to asmobile modules or simply modules. For example, if application 160 inFIG. 1B provides map directions, the map service provider may also wantto include information regarding the weather at the destination locationspecified by the end user. Instead of developing a separate weatherapplication, the map service provider may link to another hosted orshared hosted application provided by a weather information serviceprovider that is associated with host server 110. For example,application 162 may be a weather application or module provided by adifferent company than the company providing the map service. However,because both companies have modules associated with the host server,both may include links to the other company's modules in the output ofeach company's application. Based on the links, the middlewaretransformer may incorporate output from one application into another, ora link may be presented to the end user to allow access to the featuresof another service.

In addition, because the host server handles the interaction between thetwo services, the host can track which modules are called by each otherto facilitate billing between the services. Furthermore, this trackingfeature allows one module to call back to another module without beingaware of the identity of the other module. For example, if a firstmodule calls a second module, the tracking feature allows the secondmodule to call back the first. As a result, any service can be used as amodule, which may be described as providing a reusable web service toother services.

D. Accessing Data Stored at an Intermediary from a Service

Host server 110 also includes a database 170 to support storage of dataat the host by the services for use by the services' applications.Although database 170 is shown as part of host server 110, database 170may also be supported by another server or other device suitable forproviding database functions. Database 170 may include a data structurefor storing data and also a mapping of variables, or identifiers, tospecific data, or information items. Services may use database 170 todurably store and maintain information at the host server, therebyfreeing the services of the obligation to support such a databasethemselves. For example, an application may generate output with anidentifier “% xyzlogo” that is identified in the mapping ascorresponding to a particular graphical image of the XYZ Company storedin database 170. As another example, the application's output mayinclude a variable “% date” to denote the current date when theapplication is accessed in response to a request from an end user. Uponreceipt of the output at the middleware transformer, the current date issubstituted in the output for the variable % date.

E. Developing Applications Online

Host server 110 also includes an online software development kit 116that services and application that developers may use to create, edit,test, deploy, and otherwise manage applications or modules associatedwith the hosting service. According to one embodiment, an applicationdeveloper uses a browser to log into an online development websiteassociated with the hosting service to access online softwaredevelopment kit 116. After logging in, online software development kit116 provides a user interface for display on the developer's webbrowser. The user interface presents the user with various options, suchas creating a new application, modifying an existing application,testing an application, or deleting an existing application. Forexample, to create a hosted application, the developer enters ormodifies program code using the user interface via the developer'sbrowser and then saves the code at host server 110 under a module orapplication name, or identifier. If the developer wishes to establish ashared hosted application, the developer logs into the onlinedevelopment website and provides a URL of the application. The hostedand shared hosted applications may then be made immediately availablefor use. For example, end users may log into the service provider via awebsite to access a list of available services.

II. Developing Applications Online

A. Creating Applications and Services—General

According to one embodiment, a developer uses a browser running on aclient to log on to a website through which the developer can access thetools necessary to develop an application without any specialclient-side SDK software. The website may be referred to as adevelopment website, or as an “SDK website” when, for example, thewebsite provides, or hosts, an online software development kit (SDK).

As used herein, a “developer” is synonymous with both a “serviceprovider” and a “user” (since the developer makes use of the onlinedevelopment website). Also, a “user” is distinguished from an end-useror a customer that uses the service provided by the developer.

The provider of the application development tools and host of the onlinedevelopment website may be referred to as the development provider, SDKprovider, or simply as the host. The development provider typically usesone or more servers to support the development website and the toolsprovided thereby.

Access to the development website may be controlled by requiring theuser to have a name and password. After the user has gained access tothe website, the user may be presented with a list of mobileapplications (also referred to herein as services), that the developeror user has previously created. The user may also have access to otherservices, such as samples provided by the development website provider.The development website may present the user with several options, suchas to add a new service, modify an existing service, or delete anexisting service. For example, if the user selects the “add service”option, the user is presented with a user interface that allows the userto add a service.

According to one embodiment, a service may be either a hostedapplication or a portal application. A hosted application is anapplication whose code is maintained at the development website, alsoreferred to as the host website. A portal application is an applicationwhose code is maintained at another website associated with the portalapplication developer and may typically be accessed by customers or endusers via the developer's website. However, according to anotherembodiment, a portal application may also be accessed or served toclients through the development website, in which case the portalapplication may be referred to as a “shared hosted application” or a“partially hosted application.”

B. Deploying a Hosted Application

The deployment of a hosted application may involve several steps, suchas initially creating the application, subsequently editing of theapplication, and testing of the application. In one embodiment, tocreate a hosted application, the development website provides thedeveloper or user with an interface for writing and editing code for theapplication. The interface may include an editing window or edit fieldthat the user may use to type in the code for the application.Similarly, to edit an existing application, the user is presented withan interface that displays the existing application code to the user inan editing window that allows the user to edit the code of the selectedapplication.

Application code can be written in an appropriate mark-up language (ML),such as the extensible markup language (XML). According to oneembodiment, the code is written in a mark-up language referred to hereinas “portal-to-go XML”. “Portal-to-go” and “Portal-to-go XML” may also bereferred to as Oracle9iASWireless and Oracle9iASWireless XML (or justIASWireless XML), respectively.

Portal-to-go XML consists of a set of XML tags that may be used toindicate boundaries between alternate output segments. Each outputsegment in a set of output segments may be specifically designed forcertain devices, such as mobile devices that typically have smallscreens, and others with voice capabilities.

Portal-to-go XML can be generated by any of the traditional means ofgenerating dynamic HTML, such as JavaServer Pages, CGI, or Active ServerPages, such that instead of generating HTML, the code or scriptgenerates Portal-to-Go XML. The details of such a markup language suchas Portal-to-go XML may be defined in a Document Type Definition (DTD).For example, a DTD of portal-to-go XML as implemented in one embodimentis described in U.S. provisional application Ser. No. 60/230,489, filedSep. 6, 2000.

Accorded to another embodiment, both the application code for a hostedapplication and the code that causes the generation of the userinterface used to enter and edit the code are stored on one or moreservers associated with the development provider. Consequently, the onlyclient-side software required to develop and deploy a mobile applicationis a web browser, such as Netscape Navigator.

When the user finishes inputting the code for a new application orediting the code for an existing application, the user can save the codeshown in the interface. The “save” code function may be an object, suchas a button, included in the interface. By clicking on the object, thecode is submitted, or sent, to a server remote from the client, such asa server associated with the development provider. If a new applicationis being created, the user specifies a service name and the code issaved in association with the service name. After saving the new code,the new service name will be displayed in a list of existing servicesshown when users and end users log into the development website. If anexisting application is being modified, the user may choose to save thecode under the existing service name or under a new service name.

To test the application, the user can access the application or servicevia the development website using a mobile device or a mobile devicesimulator. This is discussed in more detail below under “Accessing theNew Application or Service.” The hosted application that is deployed viathe development website is immediately available to the user for testingand to end users for use via the host website.

C. Deploying a Shared Hosted Application

In another embodiment, to create a shared hosted application, the userwrites either a portal-to-go XML document or an application program thatgenerates a portal-to-go XML document as output. The terms “partiallyhosted application” or the “shared hosted application” may be used torefer either to the XML document or the application that generates anXML document as output. The shared hosted application may be saved, forexample, at the application developer's own website. The user thenassociates a URL with the shared hosted application using, for example,an HTTP listener/web server that services the application developer'sweb site. The shared hosted application is then added as a “service” bylogging into the development website, or the SDK website, and providingthe name of the service and the URL associated with the shared hostedapplication.

D. Accessing the New Application or Service

As soon as a service has been created and/or revised, end users orcustomers that can connect to the network on which the server resides(e.g., the Internet) can access the service. The process by which theservice is accessed may vary based on the type of end user. For example,a desktop computer can connect to the Internet through a dial-up line, aDSL connection, a cable modem, an ISDN connection or many otheravailable methods. WAP phones may connect to the Internet over awireless connection using a synchronous protocol, such as through aWAP-to-HTTP gateway, or using an asynchronous protocol, such as thesimple mail transfer protocol (SMTP) or the short message service (SMS)protocol.

In general, the end user logs in to the development website and ispresented with a list of available services. The end user may select theservice that was just created and/or modified. In response to theselection of a service, the application associated with the service isobtained. The application may be associated with a portal-to-go XMLdocument or another document written in a suitable markup language. Forexample, with hosted applications, the XML may be obtained by retrievingthe portal-to-go XML that was saved at a server associated with theintermediary (e.g., the host). For portal applications, a request may besent to the URL that was specified by the developer for the service. Theweb server that manages that URL may invoke the portal application andsend the portal-to-go XML associated with the portal application back tothe server associated with the intermediary. Once the portal-to-go XMLfor the service is obtained for either a hosted or portal application,the server associated with the intermediary uses the portal-to-go XML toprovide the selected service to the client associated with the end user.

III. Generation of Device-Specific Mark-Up Code

A. Generation of Device-Specific Formatting

According to one embodiment, the mark-up language output, such asportal-to-go XML, is produced by a service without regard to the type ofclient device that is invoking the service. According to one embodiment,prior to providing the output to a client, one or more extensiblestylesheet language (XSL) style sheets are selected based on the devicetype of the client. XSL style sheets are discussed in more detail inU.S. application Ser. No. 09/631,884, filed Aug. 4, 2000, the entiredisclosure of which is hereby incorporated by reference as if fully setforth herein.

The selected style sheets are applied to the XML output from the serviceto produce customized output that is specifically formatted for theclient that requested the service. For example, the same XML output by amobile application may ultimately be manifested in the following threeways, depending on the type of client that requested the service: (1) alist of options on the display of a mobile phone, (2) a pull-down menuon a browser, and (3) an orally presented list of options on the voiceinterface of a telephone. The application developer achieves any-devicesupport without having to do any special programming because theapplications are designed to produce the same XML output regardless ofthe device used to request the service and since the device-specificformatting takes place outside the applications, such as by anintermediary applying device-specific XSL style sheets.

Further, because the execution of the code and the application of XSLstyle sheets to the output thereof occur via the host, all hosted andportal applications automatically gain device-specific support for newdevices whenever the host installs XSL style sheets for the new devices.The application developer need not make any changes to the applicationcode to support any additional or newly developed client devices. Ofcourse, if the developer wants to take advantage of improved or addedcapabilities, the developer may update the application to provideaddition output segments or variations for such capabilities.

B. Producing Output that Takes into Account Request Conditions

Another problem with providing services via applications is that theapplications function the same regardless of the specific circumstancesexisting at the time when the applications are used. For example, it maybe desirable to modify the application's output based on the congestionof the network at the time a user accesses the application. If thenetwork is heavily congested, it may be better to limit the amount ofdetail provided in the output being provided during such times of heavycongestion. Again, the application programmer can take the lowest commondenominator approach and design the application for the worst-caseconditions. However, this approach fails to take advantage of improvedconditions when they exist at other times. If the programmer selects ahigher level of detail, then the ability of the application to deliveroutput to the client device will suffer during periods of heavy networkcongestion.

Techniques are provided for producing output that takes into accountconditions, parameters, and characteristics associated with a servicerequest (which are also referred to as “request-conditions”).Request-conditions may include, for example, information about the typeof client that is requesting the service, such as a device type, orenvironmental conditions, such as the time at which the service requestis made or responded to, or the congestion on the network over which theservice is requested or supplied.

According to one embodiment, an application program continues togenerate the same output regardless of the request-conditions. Becausethe output of the application is the same regardless ofrequest-conditions, it is referred to herein as “condition-independentoutput”.

According to another embodiment, the condition-independent outputproduced by an application contains “hints” (or criteria, conditions orother guidance) as to how the output should be processed under certainrequest-conditions. A middleware transformer is provided that receivesthe condition-independent output and uses the hints contained therein,along with knowledge of the client and request-conditions, to transformthe condition-independent output into “condition-specific output,” whichmay also be referred to as “condition-dependent output.” Thecondition-specific output is then provided to the client that requestedthe service that produced the output. The middleware transformertypically is associated with the host and may be provided by a serverassociated with a host, but the middleware transformer is not limited toimplementations associated with the host.

C. Condition-Independent Output with Embedded Hints

According to one embodiment, application programmers design applicationsto generate output that contains “hints” about how the output should betransformed based on request-conditions. According to oneimplementation, the application programmer designs the application togenerate output that designates several variations of the output thatsatisfies a request to the application that resulted in the generationof the output. The variations of the output may also be referred to asalternative output segments.

The output from the application also includes one or more particularcriteria or conditions that are associated with each of the alternativeoutput segments. A middleware transformer is used to select thealternative output segment that best matches the request conditions tothe criteria or conditions that are associated with each alternativeoutput segment. A match may be determined based on whether the conditionor conditions associated with a particular alternative output segmentare satisfied or not satisfied (or whether the conditions are true orfalse).

For example, if the application output is in the form of a mark-uplanguage, such as XML, the output may include a section of code that hasthe form:

<section> <condition 1> Use this when Condition 1 is true </condition 1><condition 2> Use this when Condition 2 is true and Condition 3 is nottrue <condition 3> use this when Condition 3 is true </condition 3></condition 2> Use this for Every Other Condition </section>

The application generates the output above without regard to therequest-conditions that will exist at the time a request for a serviceis made by an end-user. The middleware transformer determines whetherany of conditions 1, 2 and 3 are true after receiving thecondition-independent output from the application. For this example, ifcondition 1 is true, then the middleware transformer transforms thecondition-independent output to produce the followingcondition-dependent output:

<section> Use this when Condition 1 is true </section>

If condition 2 is true but condition 3 is not true, then the middlewaretransformer transforms the condition-independent output to produce thefollowing condition-dependent output:

<section> Use this when Condition 2 is true and Condition 3 is not true</section>

If condition 2 and 3 are true, then the middleware transformertransforms the condition-independent output to produce the followingcondition-dependent output:

<section> use this when Condition 3 is true </section>

If conditions 1 and 2 are not true, then the middleware transformertransforms the condition-independent output to produce the followingcondition-dependent output:

<section> Use this for Every Other Condition </section>

In this example, conditions 2 and 3 are related to each other.Specifically, the output segment associated with condition 3 is notexecuted unless both conditions 2 and 3 are true.

The technique of specifying a hierarchy between conditions may be used,for example, when one condition is a subset of another condition. Forexample, condition 2 may be that the network is experiencing an unusualamount of traffic (e.g., network congestion) as compared to a thresholdamount, and condition 3 may be that the network traffic is extremelyheavy as evidenced by exceeding a specified limit. Therefore, for normalnetwork congestion, when condition 2 is true but not condition 3, theactual instruction or statement corresponding to “use this whenCondition 2 is true and Condition 3 is not true” may specify that nounusually detailed graphics should be transmitted. And if condition 3 istrue, such as might be the case for extreme network congestion, theactual instruction or statement corresponding to “use this whenCondition 3 is true” may specify that no graphics should be transmitted.

The use of condition-independent output with embedded hints allows theapplication developer to design flexibility into the service applicationto handle variables that may only be known at the time a client requestsservice from the application. Incorporating flexibility into theapplication output avoids the drawbacks of the lowest common denominatorapproach by allowing the application to adjust the output for optimalperformance based on the circumstances existing at the time of theclient's request to the application. Furthermore, the application itselfneed not have the ability to detect the conditions upon whichalternative output segments are selected, since the host will handlethat function.

D. Example of Using Embedded Hints to Identify a Type of Device

For the purpose of explanation, an implementation shall be described inwhich the conditions associated with the alternative output segments arethe device type of the requesting client. In such an implementation, thecondition-independent output generated by an application may have theform:

<section> <desktop> Use this when the client is a desktop computer</desktop> <phone> Use this when the client is a phone <WAP> use thiswhen the client is a WAP phone </WAP> </phone> Use this for Every OtherDevice </section>

The application generates this output without regard to therequest-conditions. Upon receiving the condition-independent output fromthe application, the middleware transformer determines whether theclient corresponds to any of the alternative-segment tags. For example,using the XML output above, if the client is a desktop computer, thenthe client matches the <desktop> tag and the middleware transformertransforms the condition-independent output to produce the followingcondition-dependent output:

<section> Use this when the client is a desktop computer </section>

If the client is a phone, but is not a WAP phone, then the clientmatches the <phone> tag and the middleware transformer transforms thecondition-independent output to produce the followingcondition-dependent output:

<section> Use this when the client is a phone </section>

If the client is a WAP phone, then the client matches both the <phone>tag and the <WAP> tag. The <WAP> tag is more specific than the <phone>tag, so the middleware transformer transforms the condition-independentoutput to produce the following condition-dependent output:

<section> use this when the client is a WAP phone </section>

If the client is neither a desktop computer nor a phone, then the clientdoes not match any of the alternative-segment tags and the middlewaretransformer transforms the condition-independent output to produce thefollowing condition-dependent output:

<section> Use this for Every Other Device </section>

The approach of using embedded hints to identify a type of device allowsthe application developer to write one set of code that can be used withall devices, yet the application code may contain alternative segmenttags to customize the application's output for different devices thathave varying capabilities. In the example above, if the client device isa desktop computer, full text, graphics, and sound content can be sentsince a desktop computer can easily handle all three types of content.But if the client device is a mobile phone, then perhaps no graphicswill be sent since a mobile phone is unlikely to be capable of showingsuch graphics on its display. Further, if the phone happens to be a WAPphone in the above example, the application can produce output specificto the WAP protocol.

Furthermore, if the client device is not one of those listed, a defaultconfiguration for the output can be used (e.g., the “Use this for EveryOther Device” alternative segment tag above). A default condition mayspecify output based on the lowest common denominator approach so thatany client can handle the output. However, the application developerneed not rely on such a default configuration if the device happens tobe one of the types specifically provided for, such as a desktop device,a phone, or a WAP phone. Finally, client devices that are created afterthe application is complete can still receive output that takesadvantage of their increased capabilities if they fall into one of thespecified device types, such as a desktop computer or phone in the aboveexample. Therefore, future devices need not be forced to use the mostbasic or default output just because the future device was unknown tothe application developer when writing the code for that service.

E. Producing Output Based Upon a Condition Hierarchy

According to one embodiment, a programming language is provided thatsupports alternative-segment tags that correspond to nodes in acondition hierarchy. The most general (“highest”) node in the conditionhierarchy is the default node. The other nodes correspond to specificconditions. The most specific nodes in the condition hierarchy maycorrespond, for example, to specific models of a device, or evenspecific versions of specific models. Other intermediate nodes maycorrespond to classes or types of devices, such as mobile phones orpagers.

According to one embodiment, the nodes in the condition hierarchy areassociated with each other according to parent-child relationships,where all child nodes of a given parent correspond to subcategories ofthe category associated with the parent.

FIG. 2 illustrates one such condition hierarchy. In FIG. 2, an “alldevices” node 200 in the illustrated hierarchy is the highest or defaultnode. All devices node 200 has below it several child nodes,specifically a “voice” node 210, a “desktop” node 212, a “PDA” node 214,a “pager” node 216, and a “phone” node 218, which correspond to broadclassifications of the types of devices that may access a service.

Desktop node 212 also has its own child nodes, specifically a “Unix”node 220 and a “windows” node 222, that correspond to two examples ofdesktop operating systems. Similarly, Unix node 220 has two child nodes,a “Solaris” node 224 and a “Linux” node 226, which correspond to twoversions of the Unix operating system. Likewise, phone node 218 hasseveral child nodes, specifically a “WML” node 230, an “HDML” node 232,and a “CHTML” node 234, which correspond, respectively, to phones usingthe wireless markup language (WML), the handheld device markup language(HDML), and the compact hypertext markup language (CHTML). Similarly,WML node 230 has three child nodes: a “Nokia 7110” node 240, a “TC 4411V1” node 242, and a TC 4411 V2 node 244, which correspond, respectively,to a Nokia model 7110 mobile phone, and versions 1 and 2 of the TC model4411 phone.

Given the example of a condition hierarchy shown in FIG. 2, anapplication programmer can design a program that generates the followingoutput for a menu item:

<menu item> Return <desktop> Generate Return Directions </desktop><voice> Generate Return Directions </voice> <phone> Rtrn. Dir. <TC 441V2> Generate Return Directions </TC 441 V2> </phone> </menu item>

When the middleware transformer receives this condition-independentoutput, the transformer determines the type of client to which theoutput is to be sent and generates condition-specific output.Specifically, for all clients other than desktop clients, voice clients,and phone clients, the menu item is “Return”. For desktop clients, voiceclients and the specific phone model TC 441 V2, the menu item is“Generate Return Directions”. Finally, for phone models other than TC441 V2, the menu item is “Rtrn. Dir.” The special treatment of model TC441 V2 may be desired, for example, if the TC 441 V2 is able to displaylonger menu items than conventional mobile phones.

In one embodiment, after the condition-specific output has been created,an XSL style sheet may be applied to format the output according to theneeds of the client to which the output is to be sent. In an alternativeembodiment, in addition to the output processing described above, themiddleware transformer formats the output for the specific device,either by applying one or more XSL style sheets or by any other means.

In order for the middleware transformer to perform the appropriateoutput transformation, the party that controls the middlewaretransformer, also known as the “middleware host”, maintains data thatindicates (1) the condition hierarchy, (2) the tags associated with thenodes of the condition hierarchy, and (3) the correlation between thenodes of the condition hierarchy and request-conditions.

For example, assume that the middleware transformer supports thecondition hierarchy illustrated in FIG. 2. The middleware host maymaintain data that indicates various types of information, such as theassociation of the tags in the XML to the nodes of the conditionhierarchy and the relationship of the nodes to each other. Below arerepresentative examples of the data that may be maintained by themiddleware host:

(a) phone node 218 is a child of all devices node 200;

(b) tags <phone> and </phone> are associated with phone node 218;

(c) WML node 230 is a child of phone node 218;

(d) tags <WML> and </WML> are associated with WML node 230;

(e) TC 441 V1 node 242 is a child of WML node 230;

(f) tags <TC 441 V1> and </TC 441 V1> are associated with TC 441 V1 node242; and

(g) request-condition “client device=TC 441 V1” is associated with TC441 V1 node 242.

The condition hierarchy may be developed by the service provider ordevelopment provider. By incorporating the use of a condition hierarchyin an application, the service provider may support either broad classesof devices, such as PDA's, more narrow classes of devices, such as Unixdesktop computers, or specific devices, such as Nokia model 7110 phone.The application developer may then customize the output for the servicebased on the capabilities of the devices based upon the broad class,narrow class, or specific device.

F. Producing Output by Matching Request Conditions

When the middleware transformer receives condition-independent outputthat is to be delivered to a client and the condition-independent outputincludes a set of alternative output segments, the middlewaretransformer inspects the relevant request-conditions. For example, ifthe alternative output segments are associated with different types ofclient devices, the middleware transformer determines the device type ofthe client to which the output is to be sent. Based on the applicablerequest-condition(s), the middleware transformer selects the outputsegment that most specifically matches the request-condition(s).

According to one embodiment, when the middleware transformer receivesoutput that includes alternative output segments, the middlewaretransformer selects the output segment that most specifically matchesthe request-conditions via the process outlined in the flowchart of FIG.3. In step 300, the highest node in the condition hierarchy (e.g. “alldevices” node 200 of FIG. 2) is set as the current node.

Next, in step 310, the alternative output segments that correspond tothe children of the current node are identified. Referring back to FIG.2, if the current node is the “all devices” node 200, then themiddleware transformer identifies the children as follows: voice node210, desktop node 212, PDA node 214, pager node 216, and phone node 218.

In step 320, a determination is made about whether any of the conditionsassociated with the identified children of the current node are true.For example, if the device making the service request is a pager, thenthe condition associated with pager node 216 would be true, but thecondition associated with phone node 218, as well as the other childnodes of “all devices” node 200, would not be true. Conversely, if thedevice was a phone, then the condition associated with phone node 218would be true and the remaining conditions associated with the remainingchilde nodes of “all devices” node 200 would not be true.

If a condition associated with a child of the current node is true, thenstep 330 sets that child node as the new current node and the processloops back to step 310. For example, if the current node is “alldevices” node 200 and the device is a pager, then the conditionassociated with pager node 216 is true. According to step 330, pagernode 216 is set as the current node and the process returns to step 310.

If no condition associated with any child of the current node is true,then step 340 selects the output segment associated with the currentnode. For example, if the current node is “all devices” node 200 and thedevice requesting the service is a brand new type of futuristic deviceunknown when the condition hierarchy was created, then perhaps none ofthe conditions associated with any the child nodes of “all devices” node200 would be true. Therefore, according to step 340, the output segmentassociated with the current node, which is “all devices” node 200 inthis example, is selected. For example, the output associated with “alldevices” node 200 may be capable of display on any device (e.g., thelowest common denominator approach), or the output may be capable ofdisplay on devices with a higher minimum capability level.

For example, assume that the condition-independent output of anapplication is as follows, wherein the alternative segment tagscorrespond to the nodes shown in FIG. 2:

<menu item> Return <desktop> Generate Return Directions </desktop><voice> Generate Return Directions </voice> <phone> Rtrn. Dir. <WML>Return Directions <TC 441 V2> Generate Return Directions </TC 441 V2></WML> </phone> </menu item>

Further assume that the client to which the output is to be sent is adevice identified by the nomenclature “TC 441 V1”. The conditionassociated with TC 441 V1 node 242 in FIG. 2, as well as the conditionsassociated with all nodes from which the TC 441 V1 node descends (i.e.,phone node 218 and WML node 230), are TRUE.

To determine which of the alternative output segments to use in the XMLgiven above, the middleware transformer initially establishes “alldevices” node 200 as the current node, according to step 300 of FIG. 3.

The middleware transformer then identifies the alternative outputsegments that correspond to the children of the current node. In thepresent example, the alternative output segments that correspond to thechildren of “all devices” node 200 are the output segments associatedwith voice node 210, desktop node 212, and phone node 218. As shown inthe condition-independent output above, not all of the child nodes shownin FIG. 2 for “all devices” node 2000 have a corresponding alternativeoutput segment. Thus, the application developer may only support some ofthe classes, types or specific devices included in the conditionhierarchy.

The middleware transformer then determines whether any of the conditionsassociated with the identified children of the current node are true, asspecified by step 310. In the present example in which it is assumedthat the device is a TC 441 V1, the condition associated with phone node218 is true. Consequently, phone node 218 is established as the newcurrent node per step 330.

Returning to step 310 with phone node 218 set as the current node, themiddleware transformer identifies the alternative output segments thatcorrespond to the children of phone node 218, namely WML node 230, sincethere are no alternative output segments provided in the XML above thatcorrespond to the other child nodes of phone node 218 shown in FIG. 2.

Per step 320, the middleware transformer determines whether any of theconditions associated with the identified child nodes are true. In thepresent example, the only alternative output segment with a conditionthat is true is the alternative output segment associated with WML node230. Consequently, WML node 230 is established as the new current nodeper step 330.

Returning to step 310 with WML node 230 set as the current node, themiddleware transformer identifies the alternative output segments thatcorrespond to the children of WML node 230. In the present example, theonly alternative output segment that corresponds to a child of WML node23—is the output segment associated with the TC 441 V2 node 244. Noalternative output segments are provided in the XML above for the otherchild nodes of WML node 230 shown in FIG. 2 (i.e., Nokia 7110 node 240and TC 441 V1 node 242).

Per step 320, the middleware transformer then determines whether any ofthe conditions associated with the identified children of the currentnode are true. In the present example, the condition associated with TC441 V2 node 244 is not true because the client to which the output wasassumed to be sent to is a TC 441 V1, not a TC 441 V2. Consequently, theoutput segment associated with WML node 230 is selected. Thecondition-independent output may thus be transformed into:

<menu item> Return Directions </menu item>

The example above illustrates how the best match can be identified for aparticular device, even if there is no exact match. The lack of an exactmatch may be due to a number of reasons, such as that device-specificoutput is not required and/or desired. The lack of an exact match mayalso be due to the device being new and thus the developer did not knowof the new device and the capabilities of the new device when designingthe application. Yet the new device can still receive output that issuitable for a phone in the example above instead of default output oroutput that is for another class of device, such as desktop computers.

The foregoing example is merely one technique that may be used by themiddleware transformer to select the output segment that mostspecifically matches the request-conditions. Various alternativetechniques may be used. For example, in one alternative technique, eachtag may be assigned a number that corresponds to the level within thecondition hierarchy of its corresponding node. Thus, <WML> could beassigned 3 and <phone> could be assigned 2. The appropriate outputsegment of a set of alternative output segments may then be chosen by(1) identifying, within the condition-independent output, the tags thatcorrespond to true conditions, and (2) selecting, from among those tags,the tag that has been assigned the highest value.

In the foregoing description, the request-condition used to select theappropriate output segment is the device type of the client to which theoutput is to be supplied. However, the request-condition used to selectbetween alternative output segments may vary from implementation toimplementation. For example, in one implementation, the alternativeoutput segments in a set may each be associated with a differentcongestion level of the network. In another implementation, thealternative output segments in a set may each be associated with adifferent class of end-user. In yet other implementations, thealternative output segments may be associated with combinations offactors. For example, a particular output segment may be specified foruse when (1) a particular class of user is using (2) a particular typeof client device, and (3) has a connection that supports a particulartransfer rate.

Further, the foregoing description gives examples in which the output isin the form of a mark-up language, such as XML. However, the nature ofthe output may vary from implementation to implementation. Thetechniques described herein may be used with any form ofcondition-independent output that includes (1) alternative outputsegments, and (2) some form of hints that may be used to select betweenthe alternative output segments based on request-conditions.

G. Selecting Output Based on the Language Supported by the Client Device

Use of the <WML> tag in the example above illustrates a situation inwhich the request condition used to select an alternative output segmentrelates to the markup or programming language supported by the clientdevice to which the output is to be sent. According to one embodiment,an alternative output segment associated with a“supported-programming-language” request condition may include,partially or entirely, code written in the supported programminglanguage.

For example, the output segment placed between the <WML> and </WML> tagsmay consist entirely of WML code. Consequently, when the client devicesupports the WML language, the output sent to the client is in the WMLlanguage. While the WML language is used in this example, the techniquemay be used for any programming language, including but not limited to“C++”, HTML, Visual Basic, or Java.

H. Using a Middleware Transformer to Transform Condition-IndependentOutput

Numerous benefits are realized by using a middleware transformer hostedby the middleware host to transform the condition-independent outputprior to supplying the output to a client. For example, through thistechnique, the mobile application enjoys every-device support by virtueof the middleware host providing device-specific format and protocoltransformations for new devices as the new devices are developed.Further, when the mobile application uses the alternative output segmenttechniques described above, the mobile application developer is able toprovide users with output in which the content is based on conditionsassociated with the request, without designing applications that areable to detect those conditions.

In one embodiment, the content of the output received by a client may betailored to the device type of the client without the mobile applicationbeing aware of the device type of the client to which the output issent. For example, the client device may be a pager. By using an XSLstyle sheet as discussed above to transform the application output, suchas output in portal-to-go XML, the middleware transformer can generatedevice-specific formatting for the pager.

Furthermore, the content of the output received by a client may beautomatically tailored to new types of clients, based on the categoriesto which those new clients have been assigned, without the applicationdeveloper even being aware of the new types of clients. For example,when a new type of WAP phone is developed, the middleware host willclassify the new WAP phone at the appropriate location in the conditionhierarchy. Consequently, the new WAP phone will automatically receivethose alternative output segments associated with WAP phones, if any arespecified in the output from the service application.

If a particular set of alternative output segments does not have anoutput segment associated with WAP phones, but does have an outputsegment associated with mobile phones, then the new phone willautomatically receive the alternative output segment associated withmobile phones. In this manner, the content of the output delivered tonew devices is device-specific, with the level of specificity determinedby the application developer, even for newly developed devices that theapplication developer knows nothing about when creating the application.

I. Example of Producing Output Using a Shared Hosted Application

FIG. 4 is a block diagram illustrating an example of producing outputusing a shared hosted application, according to one embodiment of theinvention. FIG. 4 illustrates a client device 410, such as a laptopcomputer or mobile phone, that is connected to an HTTP listener 420,such as a web server that provides web pages in response to requests.HTTP listener 420 may provide client device 410 with a web pagecontaining a list of services associated with a hosting service 430.Upon selection of a particular service by client device 410, HTTPlistener 420 sends a request for the particular service to a servicelinker 432 that is part of hosting service 430. Service linker 432 maybe implemented on one or more servers associated with hosting service430. Upon receipt of the request, service linker 432 identifies theservice or application that is the subject of the request and forwardsthe request from client device 410 to a service provider 440.

Service provider 440 includes an HTTP server 442 for handlingcommunications between service provider 440 and other servers, such asservice linker 432 or servers linked together as part of the Internet.Service provider 440 also includes an application server 446 fordirecting requests received by HTTP server 442 to the appropriateapplication.

Service provider 4420 also includes an application 450 that is thesubject of the request from client device 410 in this example. Forexample, application 450 may be a dining directory module that providesa listing of restaurants in a city specified by an end user via aclient, such as client device 410. Application 450 may be capable ofgenerating several sets of output, such as output 452 and output 454,depending on the request. For example, output 452 may be a prompt forthe end user to supply the name of a city for which a listing ofrestaurants is desired.

Service provider 440 also includes a database 470. For example, ifapplication 450 is a dining directory module, database 470 may includeinformation about restaurants in a number of cities. Upon selection of aparticular city by the end user, application 450 may generate output 454that includes a listing of restaurants in the chosen city.

Service provider 440 responds to the request received from client device410 via service linker 432 with a generic output 480. For example,generic output may be an electronic document containing portal-to-goXML.

Generic output 480 is sent from service provider 440 to hosting service430, where the generic output is processed by a device transformer 436.Device transformer 436 may be a server that functions as a middlewaretransformer by applying style sheets to generic XML output to acustomized output 490, as described above. Customized output is thensent to client device 410 for display to the end user.

IV. Accessing Other Applications and Services

A. Mobile Modules

Service providers and application developers can build hosted or portalapplications that are accessed by service requests sent to theintermediary, such as a host, that manages middleware transformer.According to one embodiment, the services or applications, also referredto herein as “mobile modules,” can generate output that results in callsto other mobile modules. The output may, for example, use a particularset of tags, such as <substitute> </substitute> to indicate a substitutecommand that makes reference to another mobile module, and includewithin the tags an identifier for the mobile module.

For example, the output generated by the mobile module of a first party(party1) may refer to another mobile module of second party (party2) byincluding the following set of statements:

<substitute> party2-module-identifier </substitute >

In response to receiving the output immediately above, the middlewaretransformer may invoke the mobile module of the second party identifiedby “party2-module-identifier”, embed the output of that module into theoutput from the mobile module of the first party, and deliver thecombined output to the client. This feature allows the designer of onemobile module to take advantage of the functionality of all other mobilemodules that may be available on the intermediary (e.g., the host). Thisfeature also allows the transaction with the previous service to be keptactive, as well as allowing the services to be used without having toknow who is using the services.

Also, this feature is different from linking of objects among web pageswhere the browser running on a client. For example, if a browserreceives a web page that has a link to an object, the browser sends arequest to the address specified by the link, receives an object inresponse, and then incorporates the object into the web page that isdisplayed by the browser. Thus, it is the browser running on the clientthat requests, receives, and incorporates the object into the web page.

In contrast, in the embodiment above, the intermediary receives output(e.g., at the middleware transformer) from one module, makes a requestto another module, receives output from the other module, and thenincorporates the output of both modules together and then sends thecombined output to the client. Thus, it is the intermediary, not theclient, that requests, receives, and incorporates the output of thesecond service into that of the first service.

According to another embodiment, not only can the output of one mobilemodule, referred to as the “calling” mobile module, cause the invocationof another mobile module, referred to as the “called” mobile module, butthe calling mobile module may also pass parameters to the called mobilemodule. For example, the output of the calling mobile module may includecode of the following form:

<link> called-module-identifier param1 param2 param3 </link>

The example immediately above would pass parameters “param1”, “param2”,and “param3” from the calling mobile module to the called mobile moduleidentified by “called-module-identifier.”

According to another embodiment, rather than automatically embed outputfrom the called mobile module in its output, the designer of the callingmodule may simply want to present to the user a link that, if selected,causes invocation of the programming routine of the called mobilemodule. To indicate that a link is desired, a different set of tags maybe used, such as <action> </action>, to denote that an action command isto be executed based on the statements between the <action> and</action> tags.

The intermediary knows when a first mobile module of a first party isbeing called by a second mobile module of a second party because it isthe intermediary's responsibility to perform the invocation required bythe substitute command or to perform the invocation required by theaction command, such as the selection of a link.

According to one embodiment, the intermediary stores information aboutwhich modules invoked which other modules. The information may be usedas the basis for business relationships between mobile module designers.For example, the designer of a calling module may negotiate to pay thedesigner of a called module a certain amount of money every time thecalling module invokes the called module. The party providing theintermediary (e.g., hosting services) records the inter-module calls andprovides them to the various module owners.

The tracking and management of the business relationships amongapplication providers, or module owners, are not easily implementedoutside the hosting framework described herein. For example, on theWorld Wide Web, a first party may design a first web page that includesa link to a URL associated with a second web page provided by a secondparty. It is extremely difficult (if not impossible) for the secondparty to determine whether the second web page is requested in responseto users selecting the link on the first web page or whether the secondpage is requested by other means. Consequently, it is difficult for thesecond party negotiate a per-use agreement with the first party.

According to yet another embodiment, the host maintains stateinformation at an intermediary about the services accessed by an enduser. For example, the intermediary may store an information stack foreach session by an end user. The information stack indicates thesequence in which services or mobile modules have called other mobilemodules during the session, as well as the identities of the modulemodules.

According to one embodiment, the mobile modules associated with theservices may take advantage of the state information stored at theintermediary using a callback mechanism. For example, along with a linkfor invoking a called module, the calling module may include callbackinformation. When the host invokes the called module in response toselection of the link, the callback information is stored in a record atthe intermediary, such as by placing the callback information on thestack associated with the session. The called module may provide a“done” or “exit” option, control, or object on the content provided bythe called module. The end user can select the “done” or “exit” optionwhen the end user is finished with the service provided by the calledmodule. The called module need not have any information or knowledgeabout the identity of the calling module. Instead, the called moduleneed only identify the “previously” accessed service (i.e., thepreviously used mobile module) and the intermediary will then identifythe previously accessed service based on the stack information.

In response to selection of the “done” option, a message is sent to thehost to cause the host to perform the action specified on the top of theinformation stack. In the above example, the action specified at the topof the information stack is the callback information that was placedthere at the time the called module was called. Typically, the callbackinformation will cause the calling module to be invoked once again, andcontent or output from the called module will be delivered to the enduser. From the perspective of the end user, it appears as if the enduser is returning to calling module when the end user is done with thecalled module.

B. Storing Data at an Intermediary

According to one embodiment, data may be stored at an intermediary foruse by services that are accessed through the intermediary, and when theapplications or mobile modules for the service are executed, theintermediary includes the stored data in the application output in placeof variables in the output based on a mapping of those variables to thestored data. The intermediary, which may be a host, stores both thedata, or values or information items, and a mapping between theinformation items and the variables, or identifiers. A service may storeor update data for an existing variable or store data for a new variableto be added to the mapping.

The content or output generated by a mobile module may include one ormore of the identifiers. In response to encountering output that refersto one of the identifiers, the intermediary supplies the correspondinginformation item before providing the output to the client requestingthe output.

For example, for a particular session, the host may store the data item“Mike” mapped to the identifier “name”. A module may generate theoutput:

<SimpleText> Hello %name </SimpleText>

When the host encounters such output in a particular session, the hostsubstitutes the “% name” reference with the corresponding data item“Mike”, resulting in the output:

<SimpleText> Hello Mike </SimpleText>

According to one embodiment, the service providers and developers of themobile modules can register with the host the data and identifiers to bemaintained by the host. The designers of those modules may thereby freethemselves of the burden of durably maintaining information, and yet getthe benefit of durably maintained information by merely including theappropriate identifiers in their output.

In another embodiment, a calling mobile module can set a data item orreference to allow the end user to return to the calling mobile modulewhen the end user is done with the called mobile module. For example,for a particular session, the host may associate the data item “href” toa calling module identifier. A module may generate output to create alink to the called mobile module using this data item as the firstparameter as follows:

<action> called-module-identifier %href </action>

When the host encounters this output in that particular session, thehost substitutes the “% href” reference with the calling moduleidentifier resulting in the following output:

<action> called-module-identifier calling-module-identifier </action>

As a result, when the client uses the link to the called module, thecalling module identifier is passed to the called module as a parameter.The called module may use the calling module identifier to send theclient back to the calling module when the client is done with thecalled module.

In another embodiment, prior to executing a link to another service orcalled mobile module, a data item can be stored at the intermediary thatcontains a reference to the previous service or calling mobile module.The other service or called mobile module may then provide an object,such as a “done” or “exit” control or button on a web page, thatincludes a label or variable such as “% previous.” When the intermediaryencounters the “% previous” variable in the output from the otherservice, the intermediary substitutes a reference to the previousservice or calling mobile module, thus allowing the end user to returnto the previous service by selection the object on the web page from thecalled mobile module.

While the above examples uses variables, or identifiers, such as “%name” to denote a name of an end user and “% href” to pass the callingmodule identifier to the called module, respectively, other variablesmay be used to refer to other data that will only be set or known whenthe application is executed. For example, labels can be used to get thedate or time when the application is run or a specific request by aclient is made.

V. Hardware Overview

FIG. 5 is a block diagram that illustrates a computer system 500 uponwhich an embodiment of the invention may be implemented. Computer system500 includes a bus 502 or other communication mechanism forcommunicating information, and a processor 504 coupled with bus 502 forprocessing information. Computer system 500 also includes a main memory506, such as a random access memory (RAM) or other dynamic storagedevice, coupled to bus 502 for storing information and instructions tobe executed by processor 504. Main memory 506 also may be used forstoring temporary variables or other intermediate information duringexecution of instructions to be executed by processor 504. Computersystem 500 further includes a read only memory (ROM) 508 or other staticstorage device coupled to bus 502 for storing static information andinstructions for processor 504. A storage device 510, such as a magneticdisk or optical disk, is provided and coupled to bus 502 for storinginformation and instructions.

Computer system 500 may be coupled via bus 502 to a display 512, such asa cathode ray tube (CRT), for displaying information to a computer user.An input device 514, including alphanumeric and other keys, is coupledto bus 502 for communicating information and command selections toprocessor 504. Another type of user input device is cursor control 516,such as a mouse, a trackball, or cursor direction keys for communicatingdirection information and command selections to processor 504 and forcontrolling cursor movement on display 512. This input device typicallyhas two degrees of freedom in two axes, a first axis (e.g., x) and asecond axis (e.g., y), that allows the device to specify positions in aplane.

The invention is related to the use of computer system 500 forimplementing the techniques described herein. According to oneembodiment of the invention, those techniques are performed by computersystem 500 in response to processor 504 executing one or more sequencesof one or more instructions contained in main memory 506. Suchinstructions may be read into main memory 506 from anothercomputer-readable medium, such as storage device 510. Execution of thesequences of instructions contained in main memory 506 causes processor504 to perform the process steps described herein. In alternativeembodiments, hard-wired circuitry may be used in place of or incombination with software instructions to implement the invention. Thus,embodiments of the invention are not limited to any specific combinationof hardware circuitry and software.

The term “computer-readable medium” as used herein refers to any mediumthat participates in providing instructions to processor 504 forexecution. Such a medium may take many forms, including but not limitedto, non-volatile media, volatile media, and transmission media.Non-volatile media includes, for example, optical or magnetic disks,such as storage device 510. Volatile media includes dynamic memory, suchas main memory 506. Transmission media includes coaxial cables, copperwire and fiber optics, including the wires that comprise bus 502.Transmission media can also take the form of acoustic or light waves,such as those generated during radio-wave and infra-red datacommunications.

Common forms of computer-readable media include, for example, a floppydisk, a flexible disk, hard disk, magnetic tape, or any other magneticmedium, a CD-ROM, any other optical medium, punchcards, papertape, anyother physical medium with patterns of holes, a RAM, a PROM, and EPROM,a FLASH-EPROM, any other memory chip or cartridge, a carrier wave asdescribed hereinafter, or any other medium from which a computer canread.

Various forms of computer readable media may be involved in carrying oneor more sequences of one or more instructions to processor 504 forexecution. For example, the instructions may initially be carried on amagnetic disk of a remote computer. The remote computer can load theinstructions into its dynamic memory and send the instructions over atelephone line using a modem. A modem local to computer system 500 canreceive the data on the telephone line and use an infra-red transmitterto convert the data to an infra-red signal. An infra-red detector canreceive the data carried in the infra-red signal and appropriatecircuitry can place the data on bus 502. Bus 502 carries the data tomain memory 506, from which processor 504 retrieves and executes theinstructions. The instructions received by main memory 506 mayoptionally be stored on storage device 510 either before or afterexecution by processor 504.

Computer system 500 also includes a communication interface 518 coupledto bus 502. Communication interface 518 provides a two-way datacommunication coupling to a network link 520 that is connected to alocal network 522. For example, communication interface 518 may be anintegrated services digital network (ISDN) card or a modem to provide adata communication connection to a corresponding type of telephone line.As another example, communication interface 518 may be a local areanetwork (LAN) card to provide a data communication connection to acompatible LAN. Wireless links may also be implemented. In any suchimplementation, communication interface 518 sends and receiveselectrical, electromagnetic or optical signals that carry digital datastreams representing various types of information.

Network link 520 typically provides data communication through one ormore networks to other data devices. For example, network link 520 mayprovide a connection through local network 522 to a host computer 524 orto data equipment operated by an Internet Service Provider (ISP) 526.ISP 526 in turn provides data communication services through the worldwide packet data communication network now commonly referred to as the“Internet” 528. Local network 522 and Internet 528 both use electrical,electromagnetic or optical signals that carry digital data streams. Thesignals through the various networks and the signals on network link 520and through communication interface 518, which carry the digital data toand from computer system 500, are exemplary forms of carrier wavestransporting the information.

Computer system 500 can send messages and receive data, includingprogram code, through the network(s), network link 520 and communicationinterface 518. In the Internet example, a server 530 might transmit arequested code for an application program through Internet 528, ISP 526,local network 522 and communication interface 518.

The received code may be executed by processor 504 as it is received,and/or stored in storage device 510, or other non-volatile storage forlater execution. In this manner, computer system 500 may obtainapplication code in the form of a carrier wave.

In the foregoing specification, the invention has been described withreference to specific embodiments thereof. It will, however, be evidentthat various modifications and changes may be made thereto withoutdeparting from the broader spirit and scope of the invention. Thespecification and drawings are, accordingly, to be regarded in anillustrative rather than a restrictive sense.

What is claimed is:
 1. A method comprising: receiving, at anapplication, a request for content, wherein the request originates froma client; in response to receiving the request for content, generating,at the application, a response that includes a plurality of outputsegments and indicates, for each output segment of the plurality ofoutput segments, a different condition of a plurality of conditions;sending the response from the application to a middleware transformerthat is different than the client; wherein the middleware component isconfigured to (1) determine which of the plurality of conditions issatisfied and (2) generate, based on the response and one or moreconditions of the plurality of conditions that are satisfied, a modifiedresponse that includes one or more output segments, of the plurality ofoutput segments, that correspond to the one or more conditions; whereinthe method is performed by one or more computing devices.
 2. The methodof claim 1, wherein the modified response includes only one outputsegment from the plurality of output segments.
 3. The method of claim 1,wherein: each condition of the plurality of conditions indicates adifferent type of client device; the client corresponds to a particulartype that is identified in one of the plurality of conditions.
 4. Themethod of claim 1, wherein each condition of the plurality of conditionsindicates an environmental condition that is different than a type ofclient device.
 5. The method of claim 1, wherein a first condition ofthe plurality of conditions corresponds to a time associated with therequest.
 6. The method of claim 1, wherein a first condition of theplurality of conditions corresponds to a network-related measurement. 7.The method of claim 1, wherein receiving the request comprises receivingthe request from a hosting service that executes on a device that isdifferent than a device upon which the application executes.
 8. Themethod of claim 1, wherein the request is a first request, the responseis a first response, the method further comprising: receiving, at theapplication, a second request for content, wherein the second request isdifferent than the first request and originates from a second client; inresponse to receiving the second request for content, generating, at theapplication, a second response that includes the plurality of outputsegments and indicates, for each output segment of the plurality ofoutput segments, a different condition of the plurality of conditions;sending the second response from the application to the middlewaretransformer; wherein the first response and the second response containthe same data and (a) one or more first conditions that exist at thetime the first response is sent to the middleware transformer aredifferent than one or more second conditions that exist at the time thesecond response is sent to the middleware transformer.
 9. A methodcomprising: receiving, from an application at a middleware transformer,a response to a client request that originated from a client; whereinthe response includes a plurality of output segments and indicates, foreach output segment of the plurality of output segments, a differentcondition of a plurality of conditions; in response to receiving theresponse, determining which of the plurality of conditions is satisfied;for each condition of the plurality of conditions that is determined tobe satisfied, adding, to a modified response, the output segment, of theplurality of output segments, that corresponds to said each condition;causing the modified response to be sent from the middleware transformerto the client; wherein the method is performed by one or more computingdevices.
 10. The method of claim 9, further comprising, prior toreceiving the response, receiving the client request and sending theclient request to the application.
 11. The method of claim 9, wherein:each condition of the plurality of conditions indicates a different typeof client device; the client corresponds to a particular type that isidentified in one of the plurality of conditions.
 12. The method ofclaim 9, wherein each condition of the plurality of conditions indicatesan environmental condition that is different than a type of clientdevice.
 13. The method of claim 9, wherein a first condition of theplurality of conditions corresponds to a time associated with therequest.
 14. The method of claim 9, wherein a first condition of theplurality of conditions corresponds to a network-related measurement.15. The method of claim 9, wherein the response is a first response, theclient request is a first client request, the modified response is afirst modified response, the method further comprising: receiving, fromthe application at the middleware transformer, a second response to asecond client request that is different than the first client requestand originated from a second client; wherein the second responseincludes the plurality of output segments and indicates, for each outputsegment of the plurality of output segments, a different condition ofthe plurality of conditions; wherein the second response contains thesame data as the first response; in response to receiving the secondresponse, determining which of the plurality of conditions is satisfied;for each condition of the plurality of conditions that is determined tobe satisfied, adding, to a second modified response, the output segmentof the plurality of output segments that corresponds to said eachcondition; wherein the first modified response contains a first set ofone or more output segments of the plurality of output segments; whereinthe second modified response contains a second set of one or more outputsegments of the plurality of output segments; wherein the first set ofone or more output segments are different than the second set of one ormore output segments; causing the second modified response to be sentfrom the middleware transformer to the second client.
 16. One or morenon-transitory storage media carrying instructions which, when executedby one or more processors, cause: receiving, at an application, arequest for content, wherein the request originates from a client; inresponse to receiving the request for content, generating, at theapplication, a response that includes a plurality of output segments andindicates, for each output segment of the plurality of output segments,a different condition of a plurality of conditions; sending the responsefrom the application to a middleware transformer that is different thanthe client; wherein the middleware component is configured to (1)determine which of the plurality of conditions is satisfied and (2)generate, based on the response and one or more conditions of theplurality of conditions that are satisfied, a modified response thatincludes one or more output segments, of the plurality of outputsegments, that correspond to the one or more conditions.
 17. The one ormore storage media of claim 16, wherein the modified response includesonly one output segment from the plurality of output segments.
 18. Theone or more storage media of claim 16, wherein: each condition of theplurality of conditions indicates a different type of client device; theclient corresponds to a particular type that is identified in one of theplurality of conditions.
 19. The one or more storage media of claim 16,wherein each condition of the plurality of conditions indicates anenvironmental condition that is different than a type of client device.20. The one or more storage media of claim 16, wherein a first conditionof the plurality of conditions corresponds to a time associated with therequest.
 21. The one or more storage media of claim 16, wherein a firstcondition of the plurality of conditions corresponds to anetwork-related measurement.
 22. The one or more storage media of claim16, wherein receiving the request comprises receiving the request from ahosting service that executes on a device that is different than adevice upon which the application executes.
 23. The one or more storagemedia of claim 16, wherein the request is a first request, the responseis a first response, wherein the instructions, when executed by the oneor more processors, further cause: receiving, at the application, asecond request for content, wherein the second request is different thanthe first request and originates from a second client; in response toreceiving the second request for content, generating, at theapplication, a second response that includes the plurality of outputsegments and indicates, for each output segment of the plurality ofoutput segments, a different condition of the plurality of conditions;sending the second response from the application to the middlewaretransformer; wherein the first response and the second response containthe same data; wherein one or more first conditions that exist at thetime the first response is sent to the middleware transformer aredifferent than one or more second conditions that exist at the time thesecond response is sent to the middleware transformer.
 24. One or morenon-transitory storage media carrying instructions which, when executedby one or more processors, cause: receiving, from an application at amiddleware transformer, a response to a client request that originatedfrom a client; wherein the response includes a plurality of outputsegments and indicates, for each output segment of the plurality ofoutput segments, a different condition of a plurality of conditions; inresponse to receiving the response, determining which of the pluralityof conditions is satisfied; for each condition of the plurality ofconditions that is determined to be satisfied, adding, to a modifiedresponse, the output segment, of the plurality of output segments, thatcorresponds to said each condition; causing the modified response to besent from the middleware transformer to the client.
 25. The one or morestorage media of claim 24, wherein the instructions, when executed bythe one or more processors, further cause, prior to receiving theresponse, receiving the client request and sending the client request tothe application.
 26. The one or more storage media of claim 24, wherein:each condition of the plurality of conditions indicates a different typeof client device; the client corresponds to a particular type that isidentified in one of the plurality of conditions.
 27. The one or morestorage media of claim 24, wherein each condition of the plurality ofconditions indicates an environmental condition that is different than atype of client device.
 28. The one or more storage media of claim 24,wherein a first condition of the plurality of conditions corresponds toa time associated with the request.
 29. The one or more storage media ofclaim 24, wherein a first condition of the plurality of conditionscorresponds to a network-related measurement.
 30. The one or morestorage media of claim 24, wherein the response is a first response, theclient request is a first client request, the modified response is afirst modified response, wherein the instructions, when executed by theone or more processors, further cause: receiving, from the applicationat the middleware transformer, a second response to a second clientrequest that is different than the first client request and originatedfrom a second client; wherein the second response includes the pluralityof output segments and indicates, for each output segment of theplurality of output segments, a different condition of the plurality ofconditions; wherein the second response contains the same data as thefirst response; in response to receiving the second response,determining which of the plurality of conditions is satisfied; for eachcondition of the plurality of conditions that is determined to besatisfied, adding, to a second modified response, the output segment ofthe plurality of output segments that corresponds to said eachcondition; wherein the first modified response contains a first set ofone or more output segments of the plurality of output segments; whereinthe second modified response contains a second set of one or more outputsegments of the plurality of output segments; wherein the first set ofone or more output segments are different than the second set of one ormore output segments; causing the second modified response to be sentfrom the middleware transformer to the second client.